﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true"
    CodeFile="employee.aspx.cs" Inherits="employee" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" runat="Server">
    Danh sách nhân viên
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="Server">

    <script type="text/javascript">
	$(document).ready(function () {
	    $("#tableOne").tablesorter({ debug: false, sortList: [[0, 0]], widgets: ['zebra'] })
        .tablesorterPager({ container: $("#pagerOne"), positionFixed: false })
        .tablesorterFilter({ filterContainer: $("#filterBoxOne"),
            filterClearContainer: $("#filterClearOne"),
            filterColumns: [0, 1, 2, 3, 4, 5],
            filterCaseSensitive: false
        });	       
	});          
</script>
<div align="center"><asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label></div>
<asp:Label ID="lblInform" CssClass="margin_l150 margin_t30" runat="server"></asp:Label>
    <table id="addBar" runat="server" width="930" border="0" align="center" cellpadding="0" cellspacing="0" class="margin_l30 margin_b5">
        <tr>
            <td width="142" align="left" valign="bottom">
                <input type="text" id="filterBoxOne" name="filterBoxTwo" />
            </td>
            <td align="left" valign="bottom">
                <img id="filterClearOne" src="images/delete.gif" class="cursorPointer"/>
            </td>
            <td width="90" height="26" align="right" valign="bottom" class="add">
                <a href="employeeAction.aspx">Thêm mới</a>
            </td>
        </tr>
    </table>
     <asp:Repeater ID="rptEmployee" runat="server" EnableViewState="false" 
        onitemdatabound="rptEmployee_ItemDataBound" 
        onitemcommand="rptEmployee_ItemCommand">
        <HeaderTemplate>
            <table id="tableOne" class="yui margin_l30 margin_b5" width="930" border="0" align="center" cellpadding="5" cellspacing="1" >
                <thead>
                    <tr>
                        <th>STT</th>
                        <th width="100" align="center" class="tableheader">Mã NV</th>
                        <th align="left" class="tableheader">Tên</td>
                        <th width="140" align="left" class="tableheader">Email</td>
                        <th width="100" align="left" class="tableheader">Tên đăng nhập</th>
                        <th width="110" align="left" class="tableheader">Quyền đăng nhập</th>
                        <th width="70" align="center" class="tableheader">Kích hoạt</th>
                        <th colspan="2" align="center" class="tableheader">Thao tác</th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align="center"><asp:Label ID="lblNo" runat="server" Text="<%# Container.ItemIndex + 1 %>"></asp:Label></td>
                <td align="center" valign="top"><a><%#Eval("Code")%></a></td>
                <td align="left" valign="top"><%#Eval("FirstName")%> <%#Eval("LastName")%></td>
                <td align="left" valign="top"><%#Eval("Email")%></td>
                <td align="left" valign="top"><%#Eval("UserName")%></td>
                <td align="left" valign="top"><%#Eval("Permission.Name")%></td>
                <td align="center" valign="top" >
                    <asp:ImageButton ID="iBtnActive" ImageUrl="~/images/unactive.gif" runat="server" CommandName="Active" ToolTip="Click để kích hoạt" CommandArgument='<%#String.Format("{0};{1}",Eval("Active"),Eval("Id"))%>'/>
                    <asp:HiddenField ID="hdnActive" runat="server" Value='<%#Eval("Active")%>' />
                </td>
                <td width="30" align="center" valign="top">
                <asp:ImageButton ID="btnEdit"  runat="server" ImageUrl="~/images/edit.png" ToolTip="Chỉnh sửa" Width="14" Height="13" CommandName="Edit" CommandArgument='<%#Eval("Id")%>'/>
                </td>                
                <td width="30" align="center" valign="top">
                    <asp:ImageButton ID="btnDelete" OnClientClick="return confirm('Bạn chắc chắn muốn xóa?')" ImageUrl="~/images/delete.gif" ToolTip="Xóa" runat="server" CommandName="Delete" CommandArgument='<%#Eval("Id")%>'/>
                    <asp:HiddenField ID="hdnId" runat="server" Value='<%#Eval("Id")%>'/>                   
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </tbody>
	    <tfoot>
	        <tr id="pagerOne">
	            <td colspan="9" class="tableFooter padding_t5" >
		            <img title="Trang đầu" alt="Trang đầu" src="images/first.png" class="first"/>
		            <img src="images/prev.png" class="prev" title="Trang trước" alt="Trang trước"/>
		            <input type="text" class="pagedisplay"/>
		            <img src="images/next.png" class="next" title="Trang kế" alt="Trang kế"/>
		            <img src="images/last.png" class="last" title="Trang sau cùng" alt="Trang sau cùng"/>&nbsp;&nbsp;
		            <select class="pagesize">
			            <option selected="selected"  value="10">10</option>
			            <option value="20">20</option>
			            <option value="30">30</option>
			            <option  value="40">40</option>
		            </select>
		        </td>
	        </tr>
	    </tfoot>
        </table>
        </FooterTemplate>
    </asp:Repeater>




</asp:Content>
